<?php
namespace App\Services\Adv;

use App\Services\ProjectValidate;
/**
 * @Author: Marte
 * @Date:   2017-05-27 16:25:13
 * @Last Modified by:   ws
 * @Last Modified time: 2018-06-12 10:16
 */
class ValidateAdvClassify extends ProjectValidate
{
    /**
     * 自定义子类初始化
     * @param array $initData
     * @return mixed
     */
    public function initValidate($initData = [])
    {
        if (!empty($initData['requiredId'])) {
            $this->rules['id']  = 'required|int|min:1';
        }
    }
    
   public $rules = [
        'id'          => 'required|numeric|min:1',
        'name'        => 'required',
        'add_user_id' => 'int|min:1',
        'pid'         => 'required|numeric|min:0',
        'status'      => 'in:-1,0,1',
        'description' => 'string|min:1',
        'app_id'      => 'required',
        'action'      => 'required',
        'page'        => 'int|min:1',
        'listRows'    => 'integer|min:1|max:100'
    ];

    public $messages = [
       
    ];

    /**
     * @var array 上面规则中定义的 key 的名字
     */
    public $attributes = [
      
    ];
}